package com.ocom.xcxapi.mq.product;

import com.ocom.amqp.core.DelayQueue;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @Description: TODO
 * @Author: 朱晖
 * @Date: 2022/7/3
 **/
@Component
public class ActiveQuiryProduct {

	@Resource
	private RabbitTemplate rabbitTemplate;

	@Resource
	private DelayQueue delayQueue;

	public void sendDelayMessage(String platOrderNO) {
//		String message = "延时消息";
		String message = platOrderNO;
		//确认收到
		this.rabbitTemplate.convertAndSend(delayQueue.getSendExchangeName(), delayQueue.getRoutingKey(), message);
	}

}